export function radarOpt(arg1) {
  let opt = {
    title: {
      text: 'Proportion of Browsers',
      subtext: 'Fake Data',
      top: 10,
      left: 10
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      type: 'scroll',
      bottom: 10,
      data: (function () {
        var list = [];
        for (var i = 0; i < arg1.length; i++) {
          list.push(arg1[i].name);
        }
        return list;
      })()
    },
    visualMap: {
      top: 'middle',
      right: 10,
      color: ['red', 'yellow'],
      calculable: true
    },
    radar: {
      indicator: [
        { name: 'IE8-', max: 500 },
        { name: 'IE9+', max: 500 },
        { name: 'Safari', max: 500 },
        { name: 'Firefox', max: 500 },
        { name: 'Chrome', max: 500 }
      ]
    },
    series: (function () {
      var series = [];
      for (var i = 0; i < arg1.length; i++) {
        series.push({
          type: 'radar',
          symbol: 'none',
          lineStyle: {
            width: 1
          },
          emphasis: {
            areaStyle: {
              color: 'rgba(0,250,0,0.3)'
            }
          },
          data: [arg1[i]]
        });
      }
      return series;
    })()
  }
  return opt
}